#pragma once
#include "stdafx.h"			
//-------------------------------------------------------------------------------------------------
//ImageExptLib.h  - base class for public interface to ImageExptLib            
//-------------------------------------------------------------------------------------------------
//FreeBSD License
//Copyright 2012 Will Stott All rights reserved.
//
//Redistribution and use in source and binary forms, with or without modification, are
//permitted provided that the following conditions are met:
//
//   1. Redistributions of source code must retain the above copyright notice, this list of
//      conditions and the following disclaimer.
//
//   2. Redistributions in binary form must reproduce the above copyright notice, this list
//      of conditions and the following disclaimer in the documentation and/or other materials
//      provided with the distribution.
//
//THIS SOFTWARE IS PROVIDED BY Will Stott ``AS IS'' AND ANY EXPRESS OR IMPLIED
//WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
//FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL Will Stott OR
//CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
//CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
//SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
//ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
//NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
//ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
//The views and conclusions contained in the software and documentation are those of the
//authors and should not be interpreted as representing official policies, either expressed
//or implied, of Will Stott.
//
//----Authors--------------------------------------------------------------------------------------
//created by: will.stott@ucl.ac.uk Feb 2012
//
//----Comments-------------------------------------------------------------------------------------
//
// The following ifdef block is the standard way of creating macros which make exporting 
// from a DLL simpler. All files within this DLL are compiled with the ImageProcsLib_EXPORTS
// symbol defined on the command line. this symbol should not be defined on any project
// that uses this DLL. This way any other project whose source files include this file see 
// ImageProcsLib functions as being imported from a DLL, whereas this DLL sees symbols
// defined with this macro as being exported.
//--------------------------------------------------------------------------------------------------
#ifdef PLUGINICPROCSTEPS_EXPORTS
#define PLUGINICPROCSTEPS_API __declspec(dllexport)
#else
#define PLUGINICPROCSTEPS_API __declspec(dllimport)
#endif

#include <string>
#include <time.h>


class PLUGINICPROCSTEPS_API  ImageExptLib
{
public:
	static const char * const CreateFunctionName;
	static const char * const ImageFileType;

	static const int	DebugStringLen = 512;			//must be > 5	'...[\n][\0]'
	static const int    ImageExptLib::MaxPathNameLen = MAX_PATH;
	static const int    ImageExptLib::MaxFileNameLen = MAX_PATH;
	static const int    ImageExptLib::MaxPathFileNameLen = ImageExptLib::MaxPathNameLen + ImageExptLib::MaxFileNameLen + 1;
	static const int    ImageExptLib::MinPathFileNameLen = 4; //c:\x

public:
	ImageExptLib::ImageExptLib(void);
	ImageExptLib::~ImageExptLib(void);

	static const char *GetLibVersion() { return "v1.0.0.8"; }
	static const char *GetLibName() { return "ImageExptLib.dll"; } 
	static const char *GetLibLicence() { return "to do"; }

	static void			   LogMsg(const char *method, const char *printfStr, ...);
	static bool			   CreateDefaultImageExptFile(const wchar_t *xmlFile, const char *owner);

	static const char *    ConvertwStrToStr(char  *dest, size_t destBuffCharsLen, const wchar_t *source, size_t sourcewStrLenMax);
	static const wchar_t * ConvertStrTowStr(wchar_t *dest, size_t destBuffwCharsLen, const char *source, size_t sourceStrLenMax);	

	static bool			   IsFileExist(const wchar_t *pathfilename);
	static bool			   CopyImageFile(const wchar_t *dest, const wchar_t *source);
	static bool			   DeleteImageFile(const wchar_t *pathfilename);

	static clock_t		_startTime;


};

//-------------------------------------------------------------------------------------------------
//			E N D   O F   F I L E
//-------------------------------------------------------------------------------------------------
